package com.bjtu.boatmq.common.protocol;

public class ResponseCode {
    public static final int NO_ERROR = 0;       // 请求执行成功，无错误

    /* Broker-Client的错误回执码 -10 ~ -19 */
    public static final int ERR_UNKNOWN_REQUEST = -10;      // 接收到了未知的请求
    public static final int ERR_NO_PARTITION_LEADER = -11;  // 当前请求的broker不是该分区leader
    public static final int ERR_NO_FOUND_MESSAGE = -12;     // 消息不完整，或找不到消息
    public static final int ERR_STORE_MESSAGE = -13;        // 消息存储失败
    public static final int ERR_PULL_TIMEOUT = -14;         // 拉取消息超时
    public static final int ERR_NO_SUBSCRIBE_TOPIC = -15;   // 拉取消息时未订阅次主题
    public static final int ERR_CONSUME_OFFSET = -16;       // 错误的消费偏移量（如比存储偏移量高）
    public static final int ERR_PULL_EXCEPTION = -17;       // 拉取消息时出现异常
    public static final int ERR_COMMIT_EXCEPTION = -18;     // 提交偏移量时出现异常
    public static final int ERR_STORE_CONSUME_OFFSET = -19; // 存储消费偏移量失败
}
